//
//  View1.m
//  IOS深入传值
//
//  Created by 江湖 on 2020/6/10.
//  Copyright © 2020 江湖. All rights reserved.
//

#import "View1.h"
#import "View2.h"
@implementation View1
- (instancetype)initWithCoder:(NSCoder *)coder{
    if (self = [super initWithCoder:coder]) {
    }
    return self;
}
- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame: frame]) {
        self.backgroundColor = [UIColor redColor];
        View2 *btnview = [[View2 alloc]initWithFrame:CGRectMake(10, 10, 100, 100)];
        [self addSubview:btnview];
    }
    return self;
}

@end
